[localization] alright, using locale.h for a source was a bad idea

* MinGW is unhappy about the conflict with <locale.h>
* Also add MinGW and MSVC targets, and address MinGW warnings