Any judge, minister of the gospel or other person uniting persons in matrimony or any clerk or keeper of the minutes of a religious society celebrating marriage by the consent of the parties before the congregation, who fails to return a certificate thereof to the judge of probate, as required by law, is guilty of a misdemeanor.