Migrating to C++11

This is a working in progress pull request that shows the status of our effort of migrating the codebase to C++11.

The primary goal for the first round is to make sure the CMake is configured properly for Mac and major Linux distributions.