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