Windows compatibilty patches (rebased to develop)

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

can we handle this header file explicitly, i.e. _not_ include typedefs.h here. It will make the includes not self-contained.