Make it build on llvm 3.5
Fix signed/unsigned comparisons