Merge from upstream

@apartmentlist/iosmobile 

I reverted Glib's change, merged with the upstream version, and then re-did Glib's change semantically.