Declaring a file-scope object in a function in a library