Fix gc_realloc to expand in place

* Issue #322
Merge pull request #334 from iabdalkader/realloc

Fix gc_realloc to expand in place