fixes for building on iOS