fixes for PHP 5.4

changes to fix strict notices on PHP 5.4