Workaround for problem with remoteX connections using Quartz 2.7.7.
Merge pull request #5843 from alja/macX_72

72x: Fix crash on remote X connection using XQuartz version 2.7.7