fix linking and install targets some more