Fix error when sys.stdout.encoding is None