agent: Fix lib directory searching