Fix MacOS compilation