Non-ports specific fixes for FreeBSD from FreeBSD