Added 2.X compatibility
Merge pull request #2 from mvader/master

Added 2.X compatibility