Fixed bug in dynamic loading when a library path is relative.