Fix compilation on OS X (at least 10.9)

- these are a bunch of typos that break compilation on OS X