Add missing #include <algorithm>, needed by VC++2013/2014 (std::min and std::max are defined in algorithm)