Fix #4343 - adds compatibility with latest puppet version

Tested with major releases from 2.7 to 3.4