Fix link flags so relative paths are not propagated.