A theoretical study of the low-lying states of Ti2 and Zr2