fix binding.gyp typos and fix build for macos and linux

Fixes a couple of typos.
Fixes build on macos.
Fixes build on linux.
Tested (builds, tests pass) on macosx 10.9.2 and ubuntu 12.04 x64.