fix Mac OSX build (and remove 'weak link' warning)