lib/android: hack to fix new_global_ref

awaiting a fix for #845

@privat This might fix some android apps, ballz at least.