Get rid of all warnings and errors on Windows.

This increases msvc compatibility.
`std::string` uses C++ exception handling, this is not enabled in release builds and there does not seem to be any working way of enabling it, better not to use it at all.