Call AttachCurrentThread when JNI_EDETACHED