Unbreak header decoding/encoding on pycurl, including under python 3