The Complexity of Reasoning with Global Constraints