Bulk viscosity of strongly interacting matter in the relaxation time approximation