fix jni error on Android ICS with using local ref as a global ref