Windows build fix.
Move EXPORT_COMPONENT() macros to the beginning of the files.

Fixes #3654