Same-sex marriages 'should be valid,' law to change: Justice minister