Modifies the protobuf source generation to support Windows users

Makes some changes to protobuf sources generation to allow the build succeed also on windows machines.