Fixed a number of compilaton warnings found when compiling on other operating systems.