Fix for drawing lags on OS X Mavericks; thanks to Ned Deily for report and Daniel Steffen for patch