Compilation fixes for iOS