fixed build regression on MacOS