Rapid responsive Mg/ZnSnP2/Sn photodetector for visible to near-infrared application