Windows compatibilty patches (rebased to develop)

copy of https://github.com/DennisOSRM/Project-OSRM/pull/979
with `develop` as  base branch.

We can try to change it somehow, but not directly. Maybe put the initialization to constructor.