Fix compatibility issue with Python 2.6