Calculation of the optical and electronic properties of the zinc-blende alloy Zn1 − xMgxSe