Avoid multiple definitions of two lovingly copy-pasted functions

Multple external definitions of a symbol causes problems when linking
statically, as for Android. Just make the functions static for now, as they
are only used locally in the files where defined anyway.

Change-Id: I8ddbaf01497c171bed4e15f6183ba43461c672d1