Made minor windows portability fix

The toupper() function seems to have a different implementation and namespace on windows systems when compared to its POSIX implementation, so I made a minor portability fix.