Strip testing code out of library footers