JNI helper for Moai engine