Added conditional macros to avoid iOS7 warnings