*: make building in FreeBSD possible

Tested with FreeBSD 8.3.