fix remaining direct use of stat syscalls outside fstatat.c