compilation fixes for iOS