Compact embedding theorems for generalized Sobolev spaces