Fix #3 for older versions of PHP