dlopen: return NULL in case of error

This patch fixes regression in d2397b7e434513e98fffe4f77b2886d0637ee3c0.
dlopen() must return NULL in case of error, pointer to shared_ptr holding NULL
returned instead.

Signed-off-by: Dmitry <dmitry@daynix.com>