Make it work on python 2.6

Fixes #38
Merge pull request #39 from ramn/master

Fix issue #38: make it work on python 2.6