Maryland governor signs bill legalizing gay marriage