fixed build for macos.