fix compilation error on Mac