In which case you rely on the context (you know, like you have to do with every other ambiguity in English ^^)
Considering how often Somalian criminals have been hijacking ships, and how this has been covered on pretty much every media form, I don't think there will be any confusion on this matter anytime soon.
Also, the verb form (Someone is pirating something) is in my experience almost exclusively used for copyright infringement. I've never heard of pirates pirating a shipment, but I've heard plenty of pirates pirating music.
It's like calling bullying 'murder'.