Fix build with gcc-based architectures:
configure: error: C++ compiler cannot create executables
Approved by: portmgr (tier-2 blanket)