Only add gcc flags if gcc is used

`-Wall` would break on Solaris (Sun Studio)