Changes so that this will work on PHP 5.3 and not require PHP 5.4.