fix imgmin undefined variable bug