Added CudaThreads for OS x support