Compatible with php 5.3 

Hello.
Sorry for my bad english.
The current version of the extension does not work correctly on php 5.3.
Also, I have not found the correct way to set it up, bypassing the configuration file.
Could you take my pull request to remedy these shortcomings?

Thanks.