In all cases mentioned in La. Rev. Stat. 13:4522 the surety for costs shall be considered a party to such suit or proceeding and shall be condemned for the amount of costs recoverable in solido with the principal if the latter is cast in the final judgment in such proceeding.