Use a direct getdents syscall on Linux to avoid relying on