SetActorLabel + Packaging

I want to use SetActorLabel, but if I package I get an error.
That makes sense, because the description says, it is only available during development.

The following does not work too, so how do I keep SetActorLabel in my code without having to comment it just for packaging?



#ifdef WITH_EDITOR
   pMyActor->SetActorLabel(sName.ToString(), false);
#endif