improved gradient browser support

Small patch to support gradients in more browsers