Compatibility with Python 2.5 and 2.6