TLS: Expect dirent.h and S_ISREG to be there (POSIX 2001).