Understanding the ion-induced elongation of silver nanoparticles embedded in silica