Fix unit tests when running on Python 2.6