fix cast in llvm 3.2