Broke check for mingw dlls into two functions.