If such a patch is coded, how would we know it is applied benevolently and affirm that it is genuine? If a 51% attack is overt, this might work, but it's more likely that such an attack will be covert and not immediately noticed. It would be better to simply guard against it by adding more hashrate. That is not a matter of how, but who will do it?