Cook laments familiar failings after Pakistan defeat