Effects of inertia on the evolution of cooperation in the voluntary prisoner’s dilemma game