Structural determination of Cl chemisorption on Si{111} and Ge{111} by total-energy minimization