Modify AttributedString to work on both Mac and iOS. Also this works  iOS5 as well