Generator-compatible UPS protects against surges