JNI fixes, added missing JNIEXPORT / JNICALL declarations

This is needed if compiling with custom visibility settings (example :
-fvisibility=hidden)