Handle weakref in cases where target is not an IDENTIFIER_NODE.

These two test cases now also match the output produced by clang. Fixes
building llvm with gcc 4.6 + dragonegg.