Fix build issue with MSVC 2013: include <algorithm> to get std::min
Merge pull request #604 from sgurfinkel/1.8.0

Fix build issue with MSVC 2013: include <algorithm> to get std::min