Added SIGPIPE handling for iOS.