Add support for setenv and setenv_safe. Refs #78.