Using UMaterialExpressionDesaturation results in linker error

Using UMaterialExpressionDesaturation results in linker error :

unresolved external symbol “private: static class UClass * __cdecl UMaterialExpressionDesaturation::GetPrivateStaticClass(wchar_t const *)” (?GetPrivateStaticClass@UMaterialExpressionDesaturation

It will fail when trying to do something like

void GetExpressions( UMaterialExpression *Exp )
{
	if ( !Exp )
		return;

	UMaterialExpressionDesaturation *ExpDesat = dynamic_cast<UMaterialExpressionDesaturation*>( Exp );
}

EDIT : Found another unlinkable class :
Error 1 error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UMaterialExpressionSubtract::GetPrivateStaticClass(wchar_t const *)” (?GetPrivateStaticClass@UMaterialExpressionSubtract@@CAPEAVUClass@@PEB_W@Z) referenced in function “void __cdecl GetTextures(class UMaterialExpression *)”

After hitting 2 more of these linker errors I did some research and it seems the class functions are actually defined in “Source\Runtime\Engine\Private\Materials\MaterialExpressions.cpp”. This is rather weird as most other materials have their own cpp in Unreal.
I then tried using the class without dynamic_cast and it did work. So it turns out that in order to do dynamic casting in Unreal without linker errors you should actually compare the class name and do static casting instead.
Code :

UClass *C = Exp->GetClass();
FString ClassName = C->GetName();
if ( wcscmp( *ClassName, L"MaterialExpressionDesaturation" ) == 0 )
{
	UMaterialExpressionDesaturation *ExpDesat = (UMaterialExpressionDesaturation*)( Exp );
        //Do something with ExpDesat...
}