Modified the library to make it PHP 5.3 compliant