Fix registering of metatypes for scriptengine

Change-Id: I68eed013c306a91833c6117ac03cda78e035a9ca
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>