fix open() on windows