Remove dependence on UIKit

Remove dependence on UIKit and add an OS X version minimum.