Fix torrents of warnings seen on recent OSX drivers for various OpenCL
kernels. This also works around several driver bugs!