Fixed build for MacOS