fix Mac OS X compilation