A couple more MinGW fixes (#17) based on woreno's branch.