West Ham manager Manuel Pellegrini rued his team's defensive mistakes after they were beaten 3-2 by Tottenham at the London Stadium.