Fix bugs on mingw when module dirfd is in use (regression 2023-04-26). * lib/getcwd.c: When GNULIB_defined_DIR, revert to the system's definitions of opendir, closedir, readdir, rewinddir. * lib/mountlist.c: When GNULIB_defined_DIR, revert to the system's definitions of opendir, closedir, readdir. * lib/scandir.c: Likewise. * lib/glob.c: Fix comment. When GNULIB_defined_DIR, don't undefine opendir, closedir.