Explicit function export for Windows DLLs with Visual Studio

Not yet working with testing library
Fix Visual Studio warnings

Still unable to build tests on Windows with the DLL export
refactor.
Fix GLib search when not using gcc, clang or msvc