Can be built on OSX.

Adds "darwin" platform and fixes some code paths that assumed incorrectly
the code was being built on Linux.

Lots of help from @sebastianmoreno on this one!

Some issues though, process.title can't be set and some tests are failing
due to issues with IPv6 (will look into that).

fixes #9