fixed an issue with jni on mac in a very hard coded way