Detecting irregular orbits in gravitational N-body simulations