Fix platform detection in some OpenCL implementations