Add python2 support

Swaps `int.from_bytes` out for `ord`, as `from_bytes` is a new python3 thing.

Could this have non-obvious implications? With `int.from_bytes` you get to pick the byteorder, but that shouldn't have any effect since it's used on exactly one byte from `urandom`.