fix compilation error on mac