Fix build error on MacOS