fix compilation on macosx