It seems that linking functions that are marked as weak and hidden is no longer
working because the linker incorrectly asumes that it needs a thunk for the
call. The linker converts weak hidden functions into local functions before the
call the check if a Thunk is needed and so isWeakUndef() no longer returns true.
This patch adds a check to look for local and undef.