use putenv which mingw supports instead of setenv