Compatibility with CUDA 6.5 on OSX 10.10

These solve two issues with newer CUDA drivers on MacOSX. (in separate commits, with self-describing names.) There is still one test failure.