improvements in build system to support mac and clang+openmp