Microsoft to lay off 18,000 over 6 months