Density-functional calculation of the parameters in the anderson model - application to mn in cdte