Fix darwin compatibility

http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html