Make runnable without readline

Readline does not always exist.
Merge pull request #1281 from unak/patch-1

Make runnable without readline