Readd CXX flags and build SHARED library