[build] Use grep -E and -F to get rid of warnings on Fedora