Fix C++ flags and missing include