Fix failing tests on Python 3.4