Add missing <algorithm> include for std::min