Paths to synchronization in the Kuramoto model with inertia