A dramatic late Robin van Persie equaliser rescued Manchester United from FA Cup elimination at West Ham United in a 2-2 draw.