Fix for earlier PHP version