Numerical solution of the generalized Serre equations with the MacCormack finite-difference scheme