backport to MSWin