Martha is on Gaeta's list of people he isn't sure he's prepared to talk to. Not at the top, mind, and she's there through no fault of her own, but Day 412's relocation to the future unsettled things. That Felix Gaeta and that Martha Jones had known each other very well. There had been an openness and trust between them that Gaeta of the present is uncomfortable with. (It's not personal, really--he's deeply uncomfortable with everyone who might have witnessed more unguardedness from future-him than present-him is strictly okay with.)
Life doesn't have much consideration for lists and Gaeta isn't trying hard enough to be reclusive, so of course he sees her just outside of the library. He acknowledges her with a nod. Maybe if he doesn't commit to conversation they can smile, part ways, and talk later when he's reestablished some distance between himself and his desire to open up to people.