Reapplying lost commits

Fix for Windows build with LLVM 3.4