Updated C build scripts for JNI shared libraries