fix compile problem on Mac OS X