Fix readline/libedit (Thanks to @remicollet)