Add conditionals to support iOS 6