missed headers, clang, bsd /usr/local style

Hi there, it was a pleasure to see such nice code :)

I've ported this code to FreeBSD 11, clang.
I'm not insisting to merge this request, but at least missed include files may be included.