Adjust log prefix in tests for Python 2.4