bugfix: fixed compiler warnings and errors when using the Microsoft Visual C++ compiler. thanks Edwin Cleton for the report.