Make extension compatible with latest PHP versions
fixes #15
Merge pull request #16 from deeky666/SO-15

Make extension compatible with latest PHP versions