Fix BSD Portability

Patch Thanks to Hans Petter Selasky