mingw: replace MSVCRT's fstat() with a Win32-based implementation