dlsym: require Ptr argument, check for NULL. fixes #7972
Merge branch 'master' of github.com:JuliaLang/julia