fix FreeBSD compile errors

FreeRDP can not be compiled on FreeBSD without these changes.
Also if my changes are not the best ones regarded from developers view, these should point to the right direction.

Note:
This is my first experience with github. Hopefully I did this pull request the right way.