Fix scan_dirs_for_shlibs on NFS, the d_type field may be DT_UNKNOWN.