Changes to make it possilbe to compile on Mac OS X 10.9

Minimum version 10.9. Should we go lower, 10.7 would be the lowerst we can go.