configure: don't apply -O2 if extra-cflags sets optimisation

If your trying to debug and want to force -O0 then don't allow the
configure script to try and set -O2.