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