US court opts for gay marriage in California