Python ncurses fix

Fixes #451
Unfortunately I didn't figure out a better way to handle this --- I simply need to append to `CPPFLAGS`, but somehow one cannot override `configure` twice (one for `link == 'shared'` and second time for the `CPPFLAGS`), one has to combine it, but then if `link != 'shared'`, one still has to append to `CPPFLAGS`. The current solution is ugly, but it works.