Barack Obama asks court to overturn gay marriage ban