Category 3 Hurricane Gonzalo weakens as it heads for Bermuda