Use Puppet's own create_resources function if available

Tested on 2.6.17 and 3.1.0.