PR#5371: a partial patch by Edwin Török to fix the FreeBSD failure