python 2.6 compatability fixes
Merge pull request #11 from pegler/master

python 2.6 compatibility tweaks