Fix freeing of a stack allocation. Fix bad LC_ASSERT definition on non-Windows platforms