Some tweaks to help compiling on iOS.