Constraining ΩM and Dark Energy with Gamma-Ray Bursts