WPImageOptimizer: Fixing memory leak