Dynamically induced cascading failures in power grids