Make use of std::min() safe for MSVC