The code which I am writing is being compiled as a library. Therefore, in order to do what you ask, I'd have to add this one line in every api function of the library or change the public api to add a mandatory init function, neither of which is an attractive option.