real_main: Use setenv() instead of putenv()