implement a portable aligned realloc