Fix support in Python 2.5/2.6