Initialize target class in setObjectClassNative()

This is usually done in the constructor, but as we don't call it, the
target class stays in status CLASS_RESOLVED. Java calls don't care about
this, but it's checked in JNI, causing crashes in a few apps.