Section 12. A sheriff who, having a person in his custody by virtue of the sentence of a court, voluntarily or negligently suffers him to escape shall be held to have received the fines, forfeitures or forfeited recognizances described in the preceding section, at the time of the escape, and shall be liable for the same, with interest and costs, as if he had received them.