Ab initio calculations of the concentration dependent band gap reduction in dilute nitrides