Section 39. The court may bind over, as in criminal prosecutions, such witnesses as are necessary, or as said attorney may designate, to appear and testify in the superior court.