BUG: Fix build errors when linking to python library in OpenSuse.

Specify libdir to the python configure command so it forces it
to be installed in the correct directory (python-build/lib).  It
also fixes compilation error when building python on OpenSuse
because panels.h form ncurses can't be found.

Closes #2899