Use stat instead of lstat on Windows