Fixing platform inconsistency

It appears that the issue is a Windows problem, with Windows providing
macros for min and max that interfere with using the proper ones defined
in the algorithm header file.