Various minor fixes for Sayantan's OpenCL versus OS X.
Merge branch 'bleeding-jumbo' into memdbg

* bleeding-jumbo:
  Various minor fixes for Sayantan's OpenCL versus OS X.