Added OSX support

Darwin uses little different structures in netinet/udp.h:udphdr and netinet/tcp.h:tcphdr.
These changes add a check if the platform is "darwin" and a few #ifdefs which adapt the appropriate structs.
This might also apply to other platform (*BSD maybe?) but I didn't have the time to check so I only add the check for OSX.
Cheers, Alex.