Include <algorithm> for std::min()

Change-Id: Ieb01023b93923777cf53a2fc8d7198d88422e8a4