More template specialization fixes for NanNew.