Cuda 5.0 depracates cudaGLSetGLDevice so obey that where we can.
Merge branch 'correct_find_cuda'