Anion displacements and the band-gap anomaly in ternary AB C 2 chalcopyrite semiconductors