Add in missing CGL stuff and fix mutability of externs.

r? @pcwalton