Fix build issues

This changes are from our internal tree which fix build issues specific to the Android build system.