Mac support

Hi Ryan,

I've added experimental support for Mac OS X. Not sure if anyone wants to clean it up or if anyone is even interested in it at all.