Rory McIlroy admitted he didn't play his best golf but was happy to hang onto his lead at the Dubai Desert Classic.