use posix stat syscall for windows