---You could tie an upgrade of the protocol to a consensus by a majority (or perhaps supermajority, if you're clever) of mining strength.---
The problem then would be that a >50% attack could overtake the entire network by inserting malicious code in the upgrade.
As it is now, the damage that a >50% attack could do is somewhat limited as long as it doesn't persist for too long.
---Or you could try to give up the total decentralization of Bitcoin, given that it's an illusion anyway and the source of most of the expense, security problems, and unwieldiness that will come to haunt the protocol.---
Decentralization is the only way a program that would be as targeted by law enforcement as bitcoin can survive.