Josh McCown signs with San Francisco