FreeBSD build fixes.

Irrlich change also submitted upstream https://sourceforge.net/p/irrlicht/patches/300/.