fix g++ when __FreeBSD__ is defined