move static-linked stub invalid dso handle checking out of dynlink.c