When making a `headless` macOS build, linking would fail complaining about missing `GHOST_ContextCGL` symbols, which are required by the Metal backend. This commit fixes this issue by compiling the macOS CGL GHOST Context if the Metal backend is enabled, instead of only depending on `WITH_HEADLESS`, similarly to what's done on Linux/other *nix systems. Pull Request: https://projects.blender.org/blender/blender/pulls/130847