Enable C++ exceptions in build targets.