Fix C++ client comilation and linkage