Rory McIlroy made a three-putt bogey on the first hole as he got his Open Championship campaign under way at Royal Portrush.