Build fixes for CUDA 6.5
(cherry picked from commit 60a5ada4541e777bd2ad3fe0322180706351e58b)