Anne Hathaway explains how she learned to deal with trolls