Oil slips as U.S. posts surprise rise in crude inventories