gallivm: Change getExtent and readByte to non-const with llvm-3.1.