Microsoft beats expectations with record revenue