55. Whenever a conviction adjudges a pecuniary penalty or compensation to be paid, or an order requires the payment of a sum of money, whether the act or law authorizing such conviction or order does or does not provide a mode of raising or levying the penalty, compensation or sum of money, or of enforcing the payment thereof, the justice of the peace, by his conviction or order, after adjudging payment of such penalty, compensation or sum of money, with or without costs, may order and adjudge,—(1) That in default of payment thereof forthwith, or within a limited time, such penalty, compensation or sum of money and costs, if the conviction or order is made with costs, shall be levied by distress and sale of the goods and chattels of the defendant, and, if sufficient distress cannot be found, that the defendant be imprisoned in the manner and for the time directed by the act or law authorizing such conviction or order or by this act, or for any period of not more than three months, if the act or law authorizing the conviction or order does not specify imprisonment, or does not specify any term of imprisonment, unless such penalty, compensation or sum of money, and costs, if the conviction or order is made with costs, and the costs and charges of the distress and of the commitment and of the conveying of the defendant to a house of detention, are sooner paid; or,
(2) That in default of payment of the said penalty, compensation or sum of money, and costs, if any, forthwith or within a limited time, the defendant be imprisoned in the manner and for the time mentioned in the said act or law, or for any term of not more than three months, if the act or law authorizing the conviction or order does not specify imprisonment, or does not specify any term of imprisonment, unless the same and the costs and charges of the commitment and of the conveying of the defendant to a house of detention are sooner paid.