Collaboration with a bad government is always optional, you can cease to do business. That's definitely tenable. It takes a lot of balls to do so.
Imagine google coming right out and saying: 'Our do no evil motto is our guiding light and we have decided that being forced by the government to act in this manner to prevent our technology from being used to spy on American citizens in ways that we can not in good conscience allow is against our principles. Therefore we will cease operating today.'.
I'm trying to imagine the effect of such a move, it strikes me that the ensuing fall-out would probably see the government as the losing party and google re-instated in very short order.
Sometimes you have to make a stand, if the same thing was a good enough reason for google to cease to do business in China then maybe it should be good enough to cease doing business in the US.