Fixes for library build order
Fixed problems with protobuf generation