Fix two failing tests on Mac OS X with python2.7.4

It's related to this python bug: http://bugs.python.org/issue17531