Portability part2

I don't get it, ``putenv`` was already being used here. The commit message says you replaced ``setenv``. AFAICS, no change is needed here.