[FIX] CUDA fixes for Mac OS X