Fix VS2013 compilation. Add missing <algorithm> include. Needed for std::max

Co-authored-by: Dzenan Zukic <dzenan.zukic@kitware.com>