If I remember my Gilbert and Sullivan, all that needs to be done is for the Major General to invoke the pirates' loyalty to the Queen. They're all noblemen gone wrong, after all.
As far as I'm concerned, the Somali pirate problem is social and economic at it's core. Somalia is still a country living in extreme poverty, leaving piracy as a viable method for making money and securing the future of one's family. This is classic in failed states, where people without access to regular opportunities, turn to alternative opportunities in order to make ends meet. It's so simple, even
Time Magazine figured it out, eventually. In short the answer is, and I can't believe I'm typing this, nation-building. I'm not talking about unilateral invasion, occupation, foreign contractors, never-ending war, etc., I'm talking about a new type of nation building, which works a little bit at a time.