add headers to project files (backport from master commit 7baa8e323e05d88c57fd4113e6980a96db2db3ba)
Properly reset global state upon library shutdown.