Made rendering compatible with OS X 10.9+