Ally Financial to lay off nearly 5% of staff