The magnetocaloric effect in Er2Fe17 near the magnetic phase transition