Check for build/install as substring

Sometimes you might run C-c c (cabal command) and then type build
--ghc-options=-fforce-recomp, but then it wouldn't've been treated as
a build process and compiling/messages wouldn't be handled
specially. So this patch just checks for the prefix "build" or
"install" and then ignores anything afterwards.