Fix all deprecation warnings under Python 3.3