Fix fatal error on Mac OS X - redmine 6578

*BSD use unsigned long as second argument to ioctl() while POSIX
 specifies *signed* int.
We could simply change the #if-ery to
```
#ifndef SIOCGIFCONF
# define SIOCGIFCONF OSIOCGIFCONF
#endif
```
and use SIOCGIFCONF in the ioctl() call.
This would completely avoid all possible complications with the type of ioctl()'s second parameter !