CXX portability improvents