Determination of Mg concentration and distribution in MgxZn1-xO films for photonic devices application