Fix build support for OpenCL 1.2. I've done this using an ugly hack.
This needs fixing at some point.