fixed (free)bsd-compiling
Merge pull request #48 from bkcsoft/master

FreeBSD-support