Change InitLibrary to use InitGVarFuncsFromTable

This simplifies the code, and also avoids usage of the
low level NewFunctionC call.
Merge pull request #2 from fingolfin/patch-1

Change InitLibrary to use InitGVarFuncsFromTable