Dollar heads for best month since February with rebound