fixes links to foreign libraries