tail: Fix -f with stdin
Based on a patch from swills@.
(cherry picked from commit 7e11889959a6c92f05e1c1949deb73295ce60bac)