Improve isglobal and isdefined flags in external decl
Improve isglobal and isdefined flags in external decl

The code was a bit messy, and this version is clearer.

k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/kcc,8l/scc,k0gaMSX/scc,k0gaMSX/scc,8l/scc,8l/scc