Two security companies have been fined after a security guard died from carbon monoxide poisoning.