Deflected efforts from Jonjo Shelvey and Chico Flores gave Swansea a first win in nine Premier League matches.