Separate the func import count from the var count.

Still doesn't actually load the variables imports, but at least it
won't skip a bunch of funcs and break even worse.
Merge pull request #1890 from unknownbrackets/elf-fix

Separate the func import count from the var count