fix class imange for php 5.4