add _O_NOINHERIT when opening files on Windows (see #2650)