First and second order corrections to the magnetic moments of nuclei using realistic interactions