net.cpp: MAC OSX compatiblity changes