Fixed build issue on FreeBSD

Sorry ignore the last pull request. I closed it. I had to change 3 different places.
Merge pull request #59 from NuLL3rr0r/master

Fixed build issue on FreeBSD