Use _putenv_s instead of setenv on MSVC

This fixes commit 9194bc9174f98a11458d138cda7794550e262418
Merge pull request #12 from linquize/msvc

Use _putenv_s instead of setenv on MSVC