Workaround for a NoClassDefError at shutdown time.