fixed bug for systems without libedit