Modelling the QCD phase transition with an effective Lagrangian of light and massive hadrons