Fix the linking of various tests against GMock