Fix some linking issues