Properly detect provider lib path