US court upholds ban on gun sales to marijuana card holders