You can run the 'take my pile if you think it's bigger' method for powers of 2, but not 5.
OK, so the first step is to get the 1st pirate out of the way.
1. Rough out 1/5 of the loot, and ask if anyone wants it, if no-one wants it then keep adding to the pile until someone takes it, or if everyone wants it, keep removing pieces until there is only one pirate asking for it, then they get that. A pirate considering whether to take it has to decide whether they are more likely to get more at this stage than if they go to the next, so there is a motivation to 'lock in the deal' early.
Then you can do this with any power of 2;
2. Roughly halve the remaining pile and the two pirates standing next to a given pile will spilt it like for two people. If there are 3 or more pirates standing next to a pile, move the treasure piece by piece to the other pile until each pile has two pirates who want to share that particular pile.