- Added algorithm header for MSVC2013 compatability
 - Changed "WIN32" to "_WIN32", as the "WIN32" define is mingw only.