Fix invalid context iOS 8 nicklockwood#44