Effect of magnesium incorporation in zinc oxide films for optical waveguide applications