The influence of quadrupolar interaction on the magnetocaloric effect in PrMg2