A macroscopic pedestrian model with variable maximal density