c++ updates

Needed for recent C++ compilers (e.g., g++ 4.8.1)