Fix compilation for Visual Studio 2013 RC

Have to add <algorithm> header to find min and max.