2.6 compatibility.
Merge pull request #15 from adriaant/master

Merging adriaant's change to restore 2.6 compatibility. Thanks!