build: improve stack protector check