fix compilation on mac