std::stoi is not supported in MinGW due to a conflict in vsprintf function for Windows.  Fixes Windows build.