title: Underlined AttributedString produces errors in Swift 4
body: <p>I have discovered that my App crashes whenever I add an attribute that underlines the text in an <code>NSAttributedString</code>. The documentation of <code>NSAttributedStringKey.underlineStyle</code> clearly states that the value should be a constant from <code>NSUnderlineStyle</code>. By simply putting the following code in a playground you instantly see an error.</p>
  
  <pre><code>import UIKit
  
  let underlinedAttributes: [NSAttributedStringKey: Any] = [
      NSAttributedStringKey.underlineStyle : NSUnderlineStyle.styleSingle
  ]
  
  let attributedString = NSAttributedString(string: "Test", attributes: underlinedAttributes)
  </code></pre>
  
  <p>Error: [_SwiftValue encodeWithEncoder:] unrecognized selector sent to instance 0x6040000451...</p>
  
  <p>Is this a bug or is there a solution?</p>