fix for older PHP versions