Fixed|Windows|MinGW: Various build issues with MinGW

Pragmas and linker options.