Fix link flags so relative paths aren't propagated.