Joyce’s maiden World Cup hundred helps Ireland to 331-8