support PHP 5.3 and updated API to 2.1