lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk