Fix test run with shared lib