Microsoft beats earnings expectations