IMO the most accurate way is to load the engine at preset RPMs and "connect the dots" like was done back in the days before computer- controlled dynos. They would have a giant analog dial of torque output and for example the engine would be loaded at 2000 RPM WOT, torque would be written down. Then again at 3000, then 4000 etc etc. From that the HP would be calculated by hand.