Fixed MacOS compilation