Quasiconformal mappings and spaces of functions with generalized first derivatives