Google Inc. GOOG, -4.28% GOOGL, -4.19% said Tuesday it has signed a definitive agreement to acquire cybersecurity company Mandiant Inc. MNDT, +16.05% for $23 a share or about $5.4 billion in cash. The stock closed Monday at $22.49.