Fix deprecation under iOS 8