Linker error when adding NavModifierComponent

I’m trying to add a UNavModifierComponent to one of my C++ classes but I receive

error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UNavModifierComponent::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UNavModifierComponent@@CAPEAVUClass@@PEB_W@Z) referenced in function "public: class UNavModifierComponent * __cdecl UObject::CreateDefaultSubobject(class FName,bool)" (??$CreateDefaultSubobject@VUNavModifierComponent@@@UObject@@QEAAPEAVUNavModifierComponent@@VFName@@_N@Z)

when I try to compile it. From searching around it looks like something needs to be added to the UCLASS declaration for this to work, which I can’t really do since this is an engine class and I’m not pulling the source down from GitHub. I was able to add a NavModifierComponent in Blueprint, so I suppose I can create a new BP with my code class as the parent but it would be nice to not have to do that extra step.