osc: Only close plugins that were loaded

This fixes a segmentation fault occuring when a plugin couldn't be
loaded (due for instance to a timeout on the network).

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>