If judgment be rendered in such action against a corporation, or against persons claiming to be such, the court may cause the costs therein to be collected by execution against such persons, or by process against the directors or other officers of such corporation.