fix storing document to identity map in php 5.3