Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ing
nonexistent Darwin-specific files on every module build.