Pricing swing options with the COS method