Autotools: Fix MinGW cross-compilation

With these changes I could cross-compile for Windows (but the paths in the resulting executable were incorrect, because for some reason we use different tree structure on Windows for now -- see @codebrainz mail on the ML).

This also reduces the amount of build system code that is different for Windows by building the plugins with Libtool on Windows too, as we do everywhere else.
BTW, it's a bit off-topic, but do we really want to keep this?  I believe there are better solutions nowadays to build a Geany plugin, and I doubt anyone actually use it.  And as the comment below says, it's a mess :)