Move the static/dynamic/nonxs LINKTYPE logic from make_ext.pl to Makefile.SH