Charge radii of exotic neon and magnesium isotopes