Add workaround for older PHP versions