Add Android.mk to compile with the Android NDK

Also, some more fixes that were preventing it from building with the
cross-compiler.