fix compile error on mac