readdir_r is deprecated in glibc due to serious memory handling issues
in the API: one cannot pass the size of the allocated dirent.
glibc authors claims readdir is thread-safe in modern implementations,
and expect POSIX to require it in a future version.
No way to check whether readdir is thread-safe though :(
("thread-safe" in this context means different directory streams, which
is good enough.)
Also remove li_dirent_buf_size.