Fix library ordering issues with link commands.