Allow compiling under FreeBSD - thank you @freultwah