Implement lookupTarget() with arch override for LLVM 3.1.

To be removed again once we drop 3.1 support.