fix up globals now that they're not externs