Shelling by Islamic State militants on two major oil terminals in Libya has started fires that have spread to giant storage tanks, officials say.