Make the build work and tests with std::cout pass.

Change-Id: I46df8d8bfa9cfaebefd4c3367126714dd2c5246f