Band gap anomaly in ternary chalcopyrite semiconductors, the role of p-d hybridization