An X-ray spectral model for Compton-thick toroidal reprocessors