Update the way environment variables are read

Hopefully this works with travis