fix for build failure in mac for cpp