Freebsd fixes

Fixes required to build SMC on FreeBSD

Sending pull for cegui-0.8 branch as cegui 0.7 is no longer available on FreeBSD, so I can't test these chenages. However, they may be cherry-picked to devel if tested there.