build: Respect CMAKE_CXX_FLAGS passed by the user

Patch from ZeroChaos, thanks!