fix for old php < 5.3