adapt env_win.cc