Fixed Makefile for OSX (Mavericks)

Same patch as for [luv](https://github.com/creationix/luv/pull/15). Also removed a circular dependency.