Convert build system to use cmake and fix for Mac OS X build
Merge pull request #1 from balr0g/cmake-build-fixes

Convert build system to use cmake and fix for Mac OS X build