Palace beat West Ham for the first at the London Stadium with goals from Patrick van Aanholt and Jordan Ayew.