fix for #3077

removing `-fvisibility=hidden` gcc option for `java` module due to lack of `__attribute__ ((visibility("default")))` in jni_md.h/JNIEXPORT