Nucleation of dislocation loops in solids under irradiation