Influence of Mg content on molecular-beam-epitaxy-grown ZnMgS ultraviolet photodetectors