Fix performance regression.

Commit 01b5d9e6 introduced a performance regression: creating a tuple of
zeros is much slower than a string. For Python 2 we have to use
'\x00' * length, but for Python 3 we need b'\x00' * length.

We use a little dirty hack with encode('utf-8') method to keep
compatibility between Python 2 and 3.