Fixes for CUDA build on MSVC 2012