compile fix for MacOS