MinGW build fixes as noted in the main branch's issues section