QuartzSupport and header changes for OS X.

@pcwalton r? Can you double check this still works on 10.8 (or whatever you are on)