Added support for PyPy and Python 2.x.