IBM beats estimates; sees gains as customers accelerate shift to cloud