Microsoft to lay off about 3% of its workforce