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