Fix #4343 - adds compatibility with latest puppet version

Tested with major releases from 2.7 to 3.4
Merge pull request #66 from ares/master

Fix #4343 - adds compatibility with latest puppet version