Import readline only in interactive mode

Fix: MN-1470