Check for mingw-gcc vs mingw-msvc when checking dependences

Fixes wrong library naiming when running with mingw-gcc

Change-Id: Id8bf210f1a119e296a212a9d0570a4c918e780c5
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>