American Airlines grounds flights nationwide due to glitch