Replace std::min and std::max with clan::min and clan::max, as the Visual Studio 2013 templates are problematic