Allow for mac development

Some of the code was tied to UIKit, make it only included when doing
iOS development.