Support bytestring URLs on Python 3.x