fix build error in Mac OS X