Added #ifdef for Mac