Exact quantisation of the relativistic Hopfield model