Makes compatible with python 2.6
Merge pull request #373 from mauler/feature-py26

Makes compatible with python 2.6