The crews was also quite unarmed.
Indeed.
But I'm thinking things like maxing the throttle, turning the ship into their boat, running up to the edge and cutting the grappling hook, tossing some heavy tools overboard onto their heads or into their boat etc.
Although if the AK's functioned, that's easier said than done. Then about the only thing you could try was to cut the grappling hook's rope if you had a suitably long tool, and if it's a cable, that would be tough. And the tanker is BIG, and with an apparently smallish crew. If that's the case, and the Somali's got on board with no one seeing them at first, then I certainly wouldn't take the chance the rusty AK is a nonfunctional prop once I was staring down it's barrel.
Although it's pretty easy to see why if there's a decent watch rotation, why just 2 mercenaries/security staff with good clean rifles, and a pile of ammo. Maybe something belt-fed for fire suppression, could easily stop such an attack.