Pakistan to take water dispute to court