[fix] build issue with std::min on some platforms.