Fix in JNI interface to properly return byte arrays with null characters