[mod] Added #ifdef around OSX specific code.