[shared] fix windows build and windows related warnings