Added register_uninstall_hook()

Once again, just following @dbernar1's pull request and updating this
one.