support bytestring < 0.10,