added missing #ifdef __apple__