Somali pirates have made tens of millions of dollars over the past two years hijacking ships for ransom .