Make it work on Python 3

(this breaks for python 2.5 and earlier)