Handle `uintptr_t`s better in JNI bindings