We have to allow two different forms of coercion. When printing directly
through console.log etc, we add a pair of square brackets around the
string.
Fixes: QTBUG-119482
Change-Id: I03177e5905b41f5f0b5aaa867b18379eb9c7a243
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>