PHP 5.3/4 strict compatibility fixes