PYTHON-436 Fix tests to be Python 2.4 compatible