Exact solution for relativistic two-body motion in dilaton gravity