Add OSX support.

The libevent libraries can be fetched using brew, brew install libevent, and setting the search path as /usr/local/Cellar/libevent/2.0.21/lib/, but if you're using 32bit mono then you have to compile your own.

Mono's Environment.OSVersion.Platform returns Unix for OSX, see http://lists.ximian.com/pipermail/mono-devel-list/2011-November/038257.html
Merge