vc++ does not know std::min