[bsd] FreeBSD polyfills
Merge branch 'ng' of github.com:Eugeny/ajenti into ng