Add compatibility with Python >= 3.3

All tests succeed in Python 2.7 and 3.3.

Some whitespace autoremoved. Sorry for that, I did not notice.