I think these assholes off of Somalia as a bunch of cowards who would never actually be willing to fight to "take" a ship. I say, train the mariners on board to use full auto weapons, build defensive firing positions around the vessel's decks, give them night vision equipment and arm the mariners with better than popguns and let them deter an attack with real force! Two 50cal's on each ship should be all that is needed to make the whole problem go away.
There is no way you can tell me that men firing from a large stable merchant vessel can't fire more accurately than a bunch of drugged up t-shirt wearing bums in a little boat.
As a master, I'd be ready to sound the general alarm to bring the crew out to fight but I'd need to know that they are trained, ready, willing and equipped to do so.
If there is too much opposition from the mariner's unions against this then hire an armed guard to ride the vessel through the danger zone. They get off at one end and pick up a ship going the other way. I am sure there are planty of ex military guys who would take the job for the right $$. The cost of this will be peanuts compared to the cost of a ship being held for months by a bunch of cretins!