Fix build issue with MSVC 2013: include <algorithm> to get std::min