All marriages heretofore solemnized by any judge of a court of record in this State, who was not at the time of such solemnization authorized to solemnize marriages, if otherwise valid, shall be as valid as if the same had been solemnized by a person authorized to solemnize marriages.
N.J.S. § 37:1-13.2