Fix compile error with gcc44 and cuda50

fixes #2908