updates for macos cmake build and threading