Fixed building on OS X.

I got it to work on OS X 10.10.2 using clang.

Note: I'm an OS noob :)
Merge pull request #120 from torbjo/master

Fixed building on OS X. - Tested and accepted :)