Remove usage of deprecated clEnqueueTask()

This removes the usage of the deprecated clEnqueueTask()
function when compiled with OpenCL 2.0 or later.