I am unaware of any game in which this actually happened, but this is my interpretation of the rules:
By rule 5, section 13, the media timeouts take place "at the first dead ball" after the 16, 12, 8, and 4-minute marks (or 15, 10, and 5-minute marks, depending on the agreement, but this is rare).
By rule 6, section 5:
The ball shall become dead or remain dead when:
e. Time expires for a half or extra period.
Therefore, if there were no stoppages of play in the last four minutes, there would be a media timeout immediately preceding halftime.
This would be consistent with other timeout rules; it is, in fact, legal to call a timeout during halftime or between the second half and overtime (though two successive timeouts cannot be called during such break periods; see Approved Ruling 161 in the 2012 Case Book).
As a side note, if there were no stoppages in play between the 9:00 and 3:30 mark and a player is fouled in the act of shooting, the 8 minute timeout would occur before the first free throw and the 4 minute timeout would occur at the next dead ball, which is before the second free throw (AR 159).