Compiling on OSX

I've updated the CMakeLists.txt so that it will build on OSX 10.8.5 using curl (7.38.0) installed by macports in /opt/local.