Load providers with the correct environment

This should solve https://projects.puppetlabs.com/issues/17814.