Another fixes and stubs that shall allow compilation on FreeBSD
(but still does not)