There is no solution to the 51% attack problem.
However, don't worry as it is difficult to pull off a 51% attack. Like hacking the Federal Reserve.
The fed is the one I am worried about. The US federal government destroyed several alt currencies in the recent past. Such as egold. They even went after companies located outside of the USA in weaker countries which they bullied. And are printing toilet paper, excuse me, dollars like there is no tomorrow.
If the fed sends cops to BFL to seize all the hypothetical next gen ASICs when they are about to ship them... or puts in billions of dollars towards designing their own ASIC and building a massive farm of them, then bitcoin will be ruined.
Not to even mention multiple nations cooperating about it. China, Russia, the USA and European union nations pooling their resources to seize bitcoin. Heck they don't even have to intentionally destroy it, they can just seize it and centralize and use a 51% attack to do so, then it is no different then any other fiat currency