fixes to maintain support for python 2.6
Merge pull request #67 from dpford/py26_fix

Fixes to maintain support for python 2.6