Since not all file systems support d_type, I made its static fallback dynamic