Fixed compilation on VC12 (VS2013 RC), std::min and std::max require <algorithm>
Merge pull request #3580 from seemk/vc12_fix

Fixed compilation on VC12 (VS2013 RC)