fix linker error on Mac OSX