Stop using 10.9 deprecated CGContext function
Only pull in AvailabilityMacros.h when necessary