add compatibility to PHP 5.3