python: Support alternatate libdir for tests