Fix compilation with Visual Studio 2013

The <algorithm> header is required to define std::min/std::max
Fix compilation error in SWIG 3.x