A search for polarized thermal emission from directly imaged exoplanets and brown dwarf companions to nearby stars