Obama urges court to overturn gay marriage ban