Fix benchmark.py on Python 3.