Fixed up compatibility for Python 2.6. Fixes #28.