Fixes for running C++ sample on Linux.