Two second-half goals helped Swansea to a 2-0 win over Fulham, their first victory in nine Premier League games.