Fix benchmarks

These changes were done while testing v2.4 in Gentoo Linux. Later I found that user @edschofield have almost the same pull request...