Makes this work with Qt6 as well, which doesn't have an implicit conversion operator to JNIEnv* anymore.