Changes necessary to compile for iOS