Fixed an error in the MinGW build and added an uninstallation routine