Fix deprecation warning when targeting ios7