grep: fix empty word-regexp matches