On the role of external constraints in a spatially extended evolutionary prisoner’s dilemma game