This should fix #85.

It's prefered to fallback to the newer api instead of checking for
versions before 1.9 and 1.9 and leaving others open to breakage.
Merge pull request #86 from jansegre/master

This should fix #85