Fixes #3 by adding support for php >=3.7