Fix for PHP 5.2

Closes #113