patches/ports-android: fix jni local reference overflow