Fix call stack corruption on MS-Windows during overlapped IO on socket streams.
Try to make stack direction detection more reliable on GCC 4.7.0 and later.