Statically link ncurses and readline from own distribution.
Merge pull request #781 from ktf/fix-readline

Fix python readline support.