The bond given by a witness for his appearance has the same effect as a bond of the accused and may be forfeited and recovered upon in the same manner.