Set dynamic library paths

This reverts commit 9c4b7f81568487e15539a95e417a711cb1af7ecb.