get static compile most of the way to supporting windows
fix #4213. seriously, that was all that was needed?