Attempted to fix C99/C++11 problems with VS11