Fix mac os compile error