fix compile error on OS X