Fixes issue with shared libraries not linking correctly.