3.9.1 compatible

I'm using it on 3.9.1 with no problems.
Merge pull request #65 from deconf/patch-1

3.9.1 compatible