Build fixes for compiling with a cross-compiler and the Android NDK