Another FreeBSD compile fix
Apparently, on FreeBSD the sys/types.h is not included while it does make use of types defined there. So include it manually first.