Update jni.c

Workaround for bug in Android NDK (https://groups.google.com/forum/#!msg/android-ndk/ynqgCjnG51s/qTX5wnW_ExwJ)