We did it both ways - Thai preferred us to wait until he was born so they could put down he or she. On Aer Lingus (online), I just put down 2 initials - the initial of the name we had chosen if he was a boy and the same if he was a girl. I guessed (correctly) the sex because we didn't know until the birth. At the time of flying, Aer Lingus didn't notice/didn't care that his second initial on the booking wasn't on his passport...