Update DocumentBuilder.php

Removed unsupported function of jms/serializer >=v0.12