readline: fixes scoping bug

Signed-off-by: Fedor Indutny <fedor@indutny.com>