Adapting Auxiliary Losses Using Gradient Similarity