Added #defs to omit code which is iOS specific.

Makes compilation for osx deployment targets possible.