Fixed MinGW build issues and added .elf extension to build targets