Rory McIlroy moved within a shot of the lead by holing a 25-foot birdie at the par-four 18th during the opening round of the US Open.