Fix buiding issue on Mac OS X