Add merge-base method.