Fix failing tests on py3k.