Fix open mode for win.