allow passing custom environment into configure call