Build fixes for case where HAVE_CUDA==OFF.