Add missing includes for msvc 2013

std::min and std::max need #include <algorithm>
Switch testing script to msvc 2013