fix package resource to support Puppet 3.4 and later