Add some includes needed for FreeBSD, untested elsewhere