Cudnn r2

Add compatibility with cudnn R2 release.  This should also still work with R1, but I haven't tested it yet.