work around xamarin concurrency bugs in jni binding