Bruno Guimaraes struck a 90th-minute winner as Newcastle battled to a hard-fought 2-1 victory over struggling Fulham at St James' Park.