[makefile] Fix -fno-stack-protector test on older versions of gcc