This change proposed by Sergey Ponomarev should improve the file type matching on non-bleeding-edge distros.