fixed linking now that extern mod is deprecated