Cocoa: Fix macro redefinition warning
This avoids generating a macro redefinition warning when the
GL_SILENCE_DEPRECATION macro has been defined for the whole of a larger
project.
Closes #1840.
(cherry picked from commit 1d88a2e3d6d501112a741626d91abd025bd75d16)