More fixes for building on Android