Avoid some global statics that drag in lots of code in the static linking case

When doing static linking, i.e. when building the single executable
for an iOS app, or the single DSO for an Android app, we list all our
libraries (which all are static archives) on the linker command
line. Static initializers in any library always get linked in, so it
is a good idea to avoid such in the cases where they drag in a large
amount of code. Which was the case here.

Change-Id: Idef9aec1c10686c86f517ad10cf540a313d9c829