fix usage of EntityReferenceSerializer to be compatible with XWiki 4.x