Fixed compile error on mac os