fix trivial things.

1. vs2010 compiler requires varialble defined at the begining of a code block.
2. add openssl header to two projects.
3. InitializeCriticalSectionEx() redefined. Although MSDN said this function is available after Windows Vista, the winbase.h shows it's abailable when _WIN32_WINNT >= 0x0403.