[Mac] Fixed build on Mac

Closes #1293

[ci skip]