Fixes for FreeBSD 10