Add a function to set the value of the environment variable

Users shouldn't have to care how the configuration variable is set internally, so I added a little functionality to set the value of a given env var.