Merge "Fix bugs in the x86 and arm versions of generic JNI."