Refs #8547. Use the proper DLL export macro

Should fix windows builds.
Refs #8547. Move local comparison structure to comparison function

Should fix RHEL builds