Construct GlobalValues with the correct linkage instead of using setLinkage.