A mechanism for brief glacial episodes in the Mesozoic greenhouse