Critical behavior of polar modes in lead phosphate near the ferroelastic phase transition