Use defined(__APPLE__) rather than __APPLE__