Fix build on gcc-based archs.
Tested on powerpc64, amd64.
PR: 231672 Submitted by: Piotr Kubaj Approved by: portmgr (tier-2 blanket)