mingw-w64: don't call _set_invalid_parameter_handler

Check the __MSVCRT_VERSION__, as mingw-w64 always defines
_WRITE_ABORT_MSG.

Closes #774