Include <algorithm> for std::min and std::max

Doesn't build on Windows because of this.