Updated to avoid static errors in PHP 5.4.