Backport of 1d79f6c9e5423202d5275727e1ddc60acce65b4c which fixes a portability issue affecting the build on FreeBSD 10.1.
Created attachment 11362 [details] Patch for 4.3 cherry-picked from master
Pushed to autobuild-v4-3-test.
Pushed to v4-3-test