Implement IO.ANSI format/2 and format_fragment/2