Explicit link to libreadline.

Fixes #1150.