Added backwards compatibility for Swift 4.0
Swift 4.0 compatibility (#1) * made swift 4.0 compatible * added Swift 4.0 to .travis.yml * added backport of compactMap for swift 4.0 * changed extension to Array * handling swift version inline instead of trying to backport.