Solving the Bars-Green equation for moving mesons in two-dimensional QCD