Measurement of the muonic branching fractions of the Υ(1S) and Υ(3S)