Fix #2, make the API work in PHP 5.2