Make the tests pass on versions of Python before 2.7.1

(http://bugs.python.org/issue12248)