Dollar builds on gains ahead of Fed, equities struggle