Suppress warnings from building with MinGW

Hello,

Just a simple patch. In MinGW g++ there are no `#pragma warning(pop)` etc pragmas. The macro currently detects if it's Windows by doing `#ifdef _WIN32` but MinGW is used through Windows too so the unknown pragma triggers a warning for g++.

All this patch does is surround the pragmas with `#ifdef _MSC_VER` blocks to suppress the warnings in MinGW.