Adding <algorithm> header for VS2013 compilation.