Fix visibility issues when compiling with mingw32.
Add missing AC_CANONICAL_SYSTEM option.
Fix visibility problem on non-mingw platforms (all symbols were hidden so the plugin could not be loaded).
Add libtool initialization and hack for MinGW.