San Francisco plastic bag ban upheld