This is one of the reason why what we commonly think of as 'rules' of a sport are usually actually called 'laws'. See the Laws of Cricket
They are called Laws because you cannot possibly define to the very last possible detail every single possibility that might happen - such as the example here. In cricket the laws are applied by the Umpires and their ruling is final (except in some cases where technological challenges are allowed in certain circumstances).
So in the case here, the Umpire would apply Law 32 (Caught) - which states that one condition for a fair catch is that:
(ii) the ball is at no time in contact with any object grounded beyond the boundary.
A bird in the air, is not grounded beyond the boundary
In addition it later states:
a catch shall be considered fair if .... (f) the ball is caught off an obstruction within the boundary that has not been designated a boundary by the umpires before the toss.
The umpires are not going to designate a temporary phenomenan such as a bird to be a boundary so this would clearly be a fair catch, and the batsman would be out.