Preliminary cmake support. Fixed compile errors with boost and python 2.7 on OSX.