jni: fix crashes when finding external storage. Regression from jni merge.