Fix for FreeBSD and PC-BSD