Helper function for creating JavaScript objects from dynamic constructors.
fun <T> Any?.createInstance(vararg args: dynamic): T