Fix #351 #357 - Apply @digdugg patches for mingw32-python