Fix LookupError from getpreferredencoding() when sshing into Mac OS