[osx] - fix compile

Tried to compile latest HEAD on osx - and the following changes were needed for it to compile successfully. 

Also i was told to inform you about this during configure:

configure: WARNING: net/if.h: present but cannot be compiled
configure: WARNING: net/if.h:     check for missing prerequisite headers?
configure: WARNING: net/if.h: see the Autoconf documentation
configure: WARNING: net/if.h:     section "Present But Cannot Be Compiled"
configure: WARNING: net/if.h: proceeding with the preprocessor's result
configure: WARNING: net/if.h: in the future, the compiler will take precedence
configure: WARNING:     ## --------------------------------------- ##
configure: WARNING:     ## Report this to ronniesahlberg@gmail.com ##
configure: WARNING:     ## --------------------------------------- ##

(thats why i needed to move the include of sys/socket.h in front of net/if.h i guess).