Fixed MacOS compatibility when compiling with CoreGraphics+utils.
Fixed AppleTV target.