berkelium-cpp: Correctly unregister the link when it is deleted.