fix for compiling on macosx