Make autotools build system work with MinGW