Merge "fix bug that passing invalid fd to fstats on win32 builds"