Noncommutative gauge theories and the cosmological constant