when did marriage become legal