fix compilation error on mac os x