Added extern "C" blocks around all JNI functions.