Workaround MSVC2008 build failure after switching to std::upper_bound