little cleanup
Make backwards compatible with 2.7/3.0/3.1
Merge pull request #1 from butlern/master

Backwords compat fixes