The United States has been fighting African pirates since the early days of the republic - battles so formative that, among other things, they established a long-standing pattern of dealing with foreign policy problems through armed interventions and also inspired the iconic phrase 'the shores of Tripoli' in the Marine Corps hymn.