Use ~-objects instead of @-objects for syntax exts

This is necessary for #11151 to make sure dtors run before the libraries
are unloaded.