fix compile error under Mac OS X