Theory of magnetic-field enhancement of surface-field terahertz emission