Fix readline-complete on OS X and (possibly) Windows.