Fix for earlier PHP versions