Shouldn't the static modifier on a global be enough?
static - Mark a local variable so that it is initialized one time and persists between function calls. If the declaration does not include an initializer, the value is set to zero. A global variable marked static is not visible to an application.
.edit: just tried, static indeed seems to work