FreeBSD build fixes.

Irrlich change also submitted upstream https://sourceforge.net/p/irrlicht/patches/300/.
Should we use __FreeBSD__, or BSD (which is defined after including <sys/param.h>). We use the latter in HW stats.