add Python 3.3 compatibility

I've changed some things to be able to run with python 3.3.3.
I haven't updated the version number.