Missing includes on FreeBSD

Besides some cosmetic changes, I add some missing includes on FreeBSD