Fixed compile failed in MacOS