bsd.cabal.mk: Improve the fix on haddock detection