Fighters allied with Libya's UN-backed unity government have captured two coastal towns from the Islamic State group in an advance towards its bastion Sirte, a spokesman said on Tuesday.