Added linker flags to correctly export DLL symbols on Windows and include static
copies of gcc/pthread libraries.
Attempt to put correct dllexport/import directives in config.h.