python linking fixes

This should improve the situation for bug #88 for most people, I think.

So other minor changes included here as well