intel/perf: adapt to platforms like Solaris without d_type in struct dirent