Compactness properties of sobolev imbeddings for rearrangement invariant norms