Factor out pbuffer creation
Unbreak real_dlsym