When the defendant is sentenced to imprisonment in the county jail, or to pay a fine, or both, and is unable to pay the costs, the county in which the indictment was found or information filed shall pay the costs, except such as were incurred on the part of the defendant.
§ 550.030, RSMo