Fix magic functions in generated OpenCL code.