This fixes the display on Retina Macbooks. It also moves us away from depending on the ancient XCode3 sdk.
Github-Pull: #4185 Rebased-By: Wladimir J. van der Laan Rebased-From: bb5da27, 2288206, 7fe8fe6, f76db78, ebcf375, fa1ed7c, 397e9b8