fixed CPP errors on MACOSX machines