Fix compilation flags for C++ implementation.