Switch to a C-style cast because apparently you can't static_cast function pointers from dlsym