Fix serialization of QVariantMap to javascript