Use putenv instead of setenv for windows compatiblity
