rewrote stan::agrad::max function in integrate_ode.hpp