Fix build issues on Mac OS platform.