Changes for getting QGIS build with MinGW.

This is the changes i had to do to get QGis build on Win7 with MinGW.
In the CMakelist.txt for the src/core I had to "hardcode" the setpapi string otherwise it adds the full path into the link library list.