Added fixes to compile on ndk