Upstream update

This will break the API because upstream removed a few `typedef`s.