Update CMakeLists.txt to support OSX + Clang
Add missing header <numeric> to format.h