cache dlsym lookup

I didn't do a test for whether this actually makes a significant difference in speed, but I wanted to see whether and how this would work (I'm not certain if it is actually better)

(note: there should probably be a type assert that `func` is actually a Symbol, otherwise we cache the result of a dynamic variable)