Fix compilation for Visual Studio 2013 RC

Have to add <algorithm> header to find min and max.
Merge pull request #3 from PetterS/vs2013

Fix compilation for Visual Studio 2013 RC