Fix desaturate code to work across browsers.