Replaced MACOS_X define with standardised __APPLE__. #87