Taiwan moves closer to legalizing gay marriage