Perhaps the solution to the piracy problem is a simple matter of hardening the ships. Modifications to the ship might be in order to allow for the following: The crew should be able to remain in control of the ship. The pirates should not be able to threaten the crew. When under attack the ship's crew should notify the authorities. The Navy can then come to catch the pirates.
It seems the pirates are able to ply their trade only when they have hostages. If the ships crew are not hostages and not in danger from the pirates then it is a simple matter of keeping the pirates from threatening the crew until the Navy arrives to fight the pirates.