Make script work in Python 3.