Make extension compatible with latest PHP versions
fixes #15