Fix warning: -nostdinc++ unused during compilation

This now only passes -nostdinc++ when using C++ and -nostdinc
when using C.