fix compile on mac