Ligand spin polarization and antiferromagnetic coupling in transition metal dimers