Fixed gcc level detection,
tested on apple and centos 7, works for gcc and clang