Fix lib readline check. Fixes #321