Oneliner...
Replace usage of non POSIX d_type field