Add missing <algorithm> header