Fix compile error under maxos