Influence of the Hall-bar geometry on harmonic Hall voltage measurements of spin-orbit torques