configure: Add check for libncurses