#i124509# use setenv() instead of putenv() on OSX

putenv() has changed its semantic to no longer copy input buffers which
results in problems if the input buffers were only temporary. Using
setenv(), which still copies the input buffers solves the problem.