Fix compatibility with jms/serializer v0.12