Fix build errors with Clang

Combined with pull request #2, this fixes additional build errors when building using Clang in OSX.