Specify linkage/storage on public functions/variables.

Actually a change to a private variable has leaked in, which I cannot be
bothered to remove at this point.