Dynamic measurements of optical emission during plasma immersion ion implantation