Some fixes for pre sm_30 compilation.