Finalizing JNI wrapper