Only call wfLoadExtensionMessages if defined

Bug: 68980
Change-Id: I293d15f35d69c5157222857154cca8050af87fef
(cherry picked from commit c7d931a80bbb62e3a55f70afe92eec2f3e7a1649)